﻿@using KPIS.GERP.Models.ICM
@model MasPurchaseType

@{
    ViewBag.Title = "ประเภทการจัดหา";
}

@using (Html.BeginForm("Edit", "MasPurchaseType", FormMethod.Post, new { @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()

    <div class="block-button-menu-above">
        @Html.ButtonViewAll()
        @Html.ButtonSubmit()
        @Html.ButtonCancel(new { id = Model.PcTypeId })
    </div>
    
    <div class="alert-error">@Html.ValidationSummary()</div>
    @Html.Partial("_EditorForm")
}

@section scripts
{
	<script>
		
		$("form").submit(function (e) {
			e.preventDefault();
			var currentForm = this;
			bootbox.confirm(function (result) {
				if (result) {
					currentForm.submit();
				}
			});
		});

	</script>
}